package cate.game.role.fight;

import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("副本挑战失败记录")
public class FarmFailRec {

	@NoteField("失败天数")
	public int day;

	@NoteField("今日失败次数")
	public int dailyTime;

	public void onSuccess() {
		day = 0;
		dailyTime = 0;
	}

	public void onFail() {
		if (day <= 0) {
			day = 1;
		}
		dailyTime++;
	}

	public boolean enable() {
		return day >= 1 && dailyTime >= 1;
	}

	public void onDaySpan() {
		if (day > 0) {
			day++;
		}
		dailyTime = 0;
	}
}
